package ldh.im.fxbase.data.dto;

import ldh.im.dto.business.message.MessageObject;

public class RefMessageObject<T> extends MessageObject<T> {

    private transient boolean isRefRoot = false;  // 此消息是否被引用

    public RefMessageObject(MessageObject<T> messageObject) {
        this.setLocalSeq(messageObject.getLocalSeq());
        this.setMessageType(messageObject.getMessageType());
        this.setFromUserId(messageObject.getFromUserId());
        this.setToUserId(messageObject.getToUserId());
        this.setGroupCode(messageObject.getGroupCode());
        this.setFileStatus(messageObject.getFileStatus());
        this.setActionStatus(messageObject.getActionStatus());
        this.setStatus(messageObject.getStatus());
        this.setBean(messageObject.getBean());
        this.setUserSendInfoSet(messageObject.getUserSendInfoSet());
        this.setRefType(messageObject.getRefType());
        this.setRefMessageIds(messageObject.getRefMessageIds());
        this.setServerId(messageObject.getServerId());
        this.setContent(messageObject.getContent());
        this.setWeight(messageObject.getWeight());
        this.setCreateDateTime(messageObject.getCreateDateTime());

        setRefRoot(true);
    }

    public boolean isRefRoot() {
        return isRefRoot;
    }

    public void setRefRoot(boolean refRoot) {
        isRefRoot = refRoot;
    }
}
